package cn.itsource.controller;

import cn.itsource.domain.Room;
import cn.itsource.service.IRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RoomController {

    @Autowired
    private IRoomService roomService;

    @GetMapping("/room/getById/{id}")
    public Room getById(@PathVariable("id") Integer id) {
        return roomService.getById(id);
    }
}
